package com.atguigu.three;

import com.atguigu.three.MyService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUser {

    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(com.atguigu.three.ValidationConfig.class);
        MyService service = context.getBean(MyService.class);
        com.atguigu.three.User user = new com.atguigu.three.User();
        user.setName("lucy");
        user.setPhone("13566754321");
        user.setMessage("test a t guigu");
        service.testMethod(user);
    }
}
